package com.sun.mybatisplus.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sun.mybatisplus.bean.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

@DS("master")
@Mapper
public interface UserMapper extends BaseMapper<User>  {
    @Select("select * from user where id = #{id}")
    public Map selUserById(@Param("id") Long id);

    /**
     *
     * @param page mybatis提供的分页插件，必须位于第一个参数位置
     * @param age
     * @return
     */
    public Page<Map> selPageVo(@Param("page") Page<Map> page,@Param("age") Integer age);
}
